package com.thoughtworks;

public class ReturnMovieAction implements Action {
    public void doAction(ActionParams actionParams)
    {
        actionParams.output.displayMessage("Enter the name of the movie");
        String message;
        String name=actionParams.input.getString();
        boolean result = actionParams.library.returnMovie(actionParams.libraryNumber, name);
        if (result)
            message = "Thank you for returning the movie";
        else
            message = "That is not a valid movie to return.";
        actionParams.output.displayMessage(message);
    }
}
